package org.wlgzs.office_exam_student.servlet;

import java.io.IOException;
import java.io.StringWriter;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
*@author song(mejeesong@qq.com)
*2018年1月26日
*
*/
@WebServlet("/main.html")
public class MainServlet extends BaseServlet{
	
	private static final long serialVersionUID = 1L;
	private static String CACHE = null;
	
	@Override
	public void init(ServletConfig config) throws ServletException {
		super.init(config);
	}
	
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		if(true){
			StringWriter sw = new StringWriter();
			render("main",sw);
			CACHE = sw.toString();
		}
		renderString(CACHE);

	}
	
}